﻿#ifndef DTUSETTINGWIDGET_H
#define DTUSETTINGWIDGET_H

#include <QWidget>
#include <QtWidgets>
#include "../../include/dtudata.h"

class DTUSettingWidget : public QWidget
{
    Q_OBJECT
public:
    DTUSettingWidget();
    ~DTUSettingWidget();

    void setInfo(const DTUData& data);
    void flush();
    bool checkSetting();
    QPushButton* okButton;
    QLineEdit* name_ed;
    QLineEdit* pos_ed;

private:
    void setup_ui();
    QListView* injSettingList;

    QPushButton* cancelButton;
    QPushButton* settingButton;

    void showSetting();
    void confirmSetting();
    void cancelSetting();
};

#endif // DTUSETTINGWIDGET_H
